package com.operate.api.app.term.controller;

import com.operate.api.app.term.domain.vo.AppTermVO;
import com.operate.api.app.term.service.IAppTermService;
import com.operate.api.base.ApiIndex;
import com.operate.api.base.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@Api( tags = ApiIndex.AppTermController)
@RequestMapping(value = "/api/app/term")
@RestController
public class AppTermController {

    @Autowired
    private IAppTermService service;

    @ApiOperation(value = "查询平台协议条款")
    @GetMapping(value = "/one")
    public R<AppTermVO> one(
            @ApiParam(value = "条款类型 1用户服务协议 2 用户隐私政策 3儿童个人信息保护规则 4青少年文明公约",defaultValue = "1",required = true) @RequestParam Integer type) {
        AppTermVO one = service.getOne(type);
        return new R(one);
    }



}